package xyz.cerberu.cet.log.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import xyz.cerberu.cet.global.service.EmailService;

/**
 * @author β世界
 * Created on 8:29
 * @Description 用于处理所有的异常处理事触发的日志处理事件
 */
@ConditionalOnProperty(value = "${spring.manager.email}")
@Component
@Aspect
public class ExceptionLogAspect {
    private final Logger logger = LoggerFactory.getLogger(ExceptionLogAspect.class);

    private final EmailService emailService;

    @Autowired
    public ExceptionLogAspect(EmailService emailService) {
        this.emailService = emailService;
    }

    @After("execution(* xyz.cerberu.cet.global.controller.ExceptionHandlerController.*(..))")
    public void exceptionLoggerAdvice(JoinPoint point){

    }
}
